/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

 * User: andy
 * Date: 30/07/2006
 * Time: 08:37
 */
package uk.co.droidinactu.common.file;

import java.io.BufferedReader;
import java.io.File;

public class AsciiFile {

	protected String m_sFilepath = File.separatorChar + "sdcard" + java.io.File.separatorChar;

	/**
	 * the name of the file to read
	 */
	protected String m_sFilename = "";
	protected int m_lFileSize;
	protected int m_lPosition;
	protected BufferedReader br;

	// protected FileInfo m_fiFileInfo;
	// protected FileStream m_fsFileStream;

	public final int getCurrentPosition() {
		return this.m_lPosition;
	}

	// <editor-fold desc="Properties">
	public String getFilename() {
		return this.m_sFilename;
	}

	public final int getFileSize() {
		return this.m_lFileSize;
	}

	public final int getNumberOfLines() {
		final int iLines = 0;

		return iLines;
	}

	// </editor-fold>

	public final void setCurrentPosition(final int value) {
		this.m_lPosition = value;
	}

	public void setFilename(final String aFilename) {
		int indexOf = aFilename.lastIndexOf(java.io.File.separatorChar);
		if (indexOf == -1) {
			indexOf = aFilename.lastIndexOf(java.io.File.separatorChar);
		}
		this.m_sFilename = aFilename.substring(indexOf + 1);
		this.m_sFilepath = aFilename.substring(0, indexOf + 1);
		// m_fiFileInfo = new FileInfo(m_sFilepath + m_sFilename);
		// m_lFileSize = m_fiFileInfo.Length;
		// OperationProgress_D.SetMaxValue(m_lFileSize);
	}

	public final void setFileSize(final int value) {
		this.m_lFileSize = value;
	}
} // class()
